XCOMM
XCOMM place to build the InterViews library
XCOMM

PACKAGE = src_iv

#ifdef InObjectCodeDir

#ifdef TiffDir
OTHER_CCDEFINES = $(TIFF_CCDEFINES)
OTHER_CCINCLUDES = $(TIFF_CCINCLUDES)
#endif

#if BuildIV_2_6
#define IV_2_6Srcs $(IV_2_6)$(SLASH)*.$(CCSUFFIX)
#else
#define IV_2_6Srcs /**/
#endif

#if BuildRPCClasses
#define DispatchSrcs $(DISPATCH)$(SLASH)*.$(CCSUFFIX)
#else
#define DispatchSrcs \							@@\
    $(DISPATCH)/dispatcher.$(CCSUFFIX)\					@@\
    $(DISPATCH)/iohandler.$(CCSUFFIX)
#endif

INTERVIEWS = $(SRC)/../InterViews
IV_2_6	   = $(SRC)/../IV-2_6
IV_X11	   = $(SRC)/../IV-X11
DISPATCH   = $(SRC)/../Dispatch
OS	   = $(SRC)/../OS
TIFF	   = $(SRC)/../TIFF
SRCS	   = \
	$(INTERVIEWS)$(SLASH)*.$(CCSUFFIX)\
	IV_2_6Srcs\
	$(IV_X11)$(SLASH)*.$(CCSUFFIX)\
	DispatchSrcs\
	$(OS)$(SLASH)*.$(CCSUFFIX)
	/* TIFF not included because it can't use the same flags */
LIB	   = IV

KIT_CCFLAGS = KitFlags
LIBPATHS   = -DABSLIBALLDIR='"$(ABSLIBALLDIR)"' -DRELLIBALLDIR='"$(RELLIBALLDIR)"' \
	     -DX_LIBDIR='"$(XLIBDIR)"'
DEPEND_CCFLAGS = DependCCFlags $(KIT_CCFLAGS) $(GL_CCFLAGS)

MakeLibrary($(LIB),$(VERSION))

#define InterViewsObj(file) InterViewsObjFlags(file,NullParameter)
#define InterViewsObjFlags(file,f) MakeObjectRule(file,$(INTERVIEWS)/file,f)

InterViewsObj(action)
InterViewsObj(adjust)
InterViewsObj(aggr)
InterViewsObj(align)
InterViewsObjFlags(alloctbl,$(OPTIMIZE_CCFLAGS))
InterViewsObjFlags(arrcomp,$(OPTIMIZE_CCFLAGS))
InterViewsObj(background)
InterViewsObj(bevel)
InterViewsObj(border)
InterViewsObjFlags(box,$(OPTIMIZE_CCFLAGS))
InterViewsObj(browser)
InterViewsObj(button)
InterViewsObj(character)
InterViewsObjFlags(composition,$(OPTIMIZE_CCFLAGS))
InterViewsObj(compositor)
InterViewsObj(debug)
InterViewsObj(deck)
InterViewsObjFlags(dialogs,$(KIT_CCFLAGS))
InterViewsObj(fbrowser)
InterViewsObj(fchooser)
InterViewsObjFlags(field,-O2)
InterViewsObj(geometry)
InterViewsObj(glyph)
InterViewsObj(group)
InterViewsObj(handler)
InterViewsObj(hit)
InterViewsObj(image)
InterViewsObj(input)
InterViewsObjFlags(kit,$(KIT_CCFLAGS))
InterViewsObj(label)
InterViewsObjFlags(layout,$(OPTIMIZE_CCFLAGS))
InterViewsObj(lrmarker)
InterViewsObj(menu)
InterViewsObj(mf_dialogs)
InterViewsObj(mf_kit)
InterViewsObj(monoglyph)
InterViewsObj(mono_kit)
InterViewsObj(observe)
InterViewsObjFlags(ol_kit,$(OPTIMIZE_CCFLAGS))
InterViewsObj(ol_dialogs)
InterViewsObj(page)
InterViewsObj(patch)
InterViewsObjFlags(place,$(OPTIMIZE_CCFLAGS))
InterViewsObj(polyglyph)
InterViewsObj(printer)
InterViewsObjFlags(psfont,-Dps_metrics_dir='"$(PSFONTDIR)"')
InterViewsObj(regexp)
InterViewsObj(resource)
InterViewsObj(rule)
InterViewsObjFlags(scrbox,$(OPTIMIZE_CCFLAGS))
InterViewsObjFlags(session,$(LIBPATHS))
InterViewsObj(shadow)
InterViewsObjFlags(simpcomp,$(OPTIMIZE_CCFLAGS))
InterViewsObj(slider)
InterViewsObj(smf_kit)
InterViewsObj(stencil)
InterViewsObj(stepper)
InterViewsObjFlags(style,$(OPTIMIZE_CCFLAGS))
InterViewsObj(superpose)
InterViewsObjFlags(transformer,$(OPTIMIZE_CCFLAGS))
InterViewsObj(target)
InterViewsObj(telltale)
InterViewsObjFlags(texcomp,$(OPTIMIZE_CCFLAGS))
InterViewsObjFlags(tile,$(OPTIMIZE_CCFLAGS))
InterViewsObjFlags(tiff,$(OPTIMIZE_CCFLAGS))
InterViewsObj(tformsetter)
InterViewsObj(xymarker)

#if BuildIV_2_6

#define IV_2_6Obj(file) IV_2_6ObjFlags(file,NullParameter)
#define IV_2_6ObjFlags(file,f) MakeObjectRule(file,$(IV_2_6)/file,f)

IV_2_6Obj(box2_6)
IV_2_6Obj(deck2_6)
IV_2_6Obj(glue2_6)
IV_2_6Obj(interactor)
IV_2_6Obj(message)
IV_2_6Obj(painter)
IV_2_6Obj(perspective)
IV_2_6Obj(rubband)
IV_2_6Obj(rubcurve)
IV_2_6Obj(rubgroup)
IV_2_6Obj(rubline)
IV_2_6Obj(rubrect)
IV_2_6Obj(rubverts)
IV_2_6Obj(scene)
IV_2_6Obj(sensor)
IV_2_6Obj(shape)
IV_2_6Obj(subject)
IV_2_6ObjFlags(textbuffer,$(OPTIMIZE_CCFLAGS))
IV_2_6ObjFlags(textdisplay,$(OPTIMIZE_CCFLAGS))
IV_2_6ObjFlags(tform2_6,$(OPTIMIZE_CCFLAGS))
IV_2_6ObjFlags(tray,$(OPTIMIZE_CCFLAGS))
IV_2_6Obj(viewport)
IV_2_6Obj(xbitmap2_6)
IV_2_6Obj(xevent2_6)
IV_2_6Obj(xinter)
IV_2_6ObjFlags(xpainter,$(OPTIMIZE_CCFLAGS))
IV_2_6Obj(xpattern)
IV_2_6Obj(adjuster2_6)
IV_2_6Obj(banner)
IV_2_6Obj(border2_6)
IV_2_6Obj(button2_6)
IV_2_6Obj(compeditor)
IV_2_6Obj(control)
IV_2_6Obj(dialog2_6)
IV_2_6Obj(filebrowser)
IV_2_6Obj(filechooser)
IV_2_6Obj(frame)
IV_2_6Obj(matcheditor)
IV_2_6Obj(menu2_6)
IV_2_6Obj(panner2_6)
IV_2_6Obj(scrollbar2_6)
IV_2_6Obj(scroller2_6)
IV_2_6Obj(strbrowser)
IV_2_6Obj(strchooser)
IV_2_6Obj(streditor)
IV_2_6Obj(texteditor)
IV_2_6Obj(world)

#endif

#define IV_X11Obj(file) IV_X11ObjFlags(file,NullParameter)
#define IV_X11ObjFlags(file,f) MakeObjectRule(file,$(IV_X11)/file,f)

#if BuildGLContext
GL_CCFLAGS = -DGL
IV_X11ObjFlags(glcontext,$(GL_CCFLAGS))
#endif
IV_X11ObjFlags(xbitmap,$(OPTIMIZE_CCFLAGS))
IV_X11Obj(xbrush)
IV_X11ObjFlags(xcanvas,$(OPTIMIZE_CCFLAGS))
IV_X11Obj(xcolor)
IV_X11Obj(xcursor)
IV_X11Obj(xdrag)
IV_X11Obj(xevent)
IV_X11ObjFlags(xfont,$(OPTIMIZE_CCFLAGS))
IV_X11Obj(xraster)
IV_X11Obj(xreqerr)
IV_X11Obj(xselection)
IV_X11ObjFlags(xwindow,$(OPTIMIZE_CCFLAGS))

#define DispatchObj(file) DispatchObjFlags(file,NullParameter)
#define DispatchObjFlags(file,f) MakeObjectRule(file,$(DISPATCH)/file,f)

DispatchObjFlags(dispatcher,$(OPTIMIZE_CCFLAGS))
DispatchObj(iohandler)
#if BuildRPCClasses
DispatchObj(iostreamb)
DispatchObjFlags(rpcbuf,-DSOCKLEN_T_DEFINED=$(SOCKLEN_T_DEFINED))
DispatchObj(rpchdr)
DispatchObj(rpcpeer)
DispatchObj(rpcreader)
DispatchObj(rpcregistry)
DispatchObj(rpcservice)
DispatchObj(rpcstream)
DispatchObj(rpcwriter)
#endif

#define OSObj(file) OSObjFlags(file,NullParameter)
#define OSObjFlags(file,f) MakeObjectRule(file,$(OS)/file,f)

OSObjFlags(directory,$(OPTIMIZE_CCFLAGS))
OSObj(file)
OSObj(host)
OSObj(listimpl)
OSObj(math)
OSObj(memory)
OSObjFlags(string,$(OPTIMIZE_CCFLAGS))
OSObj(ustring)

#ifndef TiffDir
#include <InterViews/TIFF.def>
#define TIFFObj(file) TIFFObjFlags(file,NullParameter)
#define TIFFObjFlags(file,f)\
MakeTIFFCObjectRule(file,$(TIFF)/file,$(TIFF_OPTIMIZE_CFLAGS) f)

TIFFObj(tif_aux)
TIFFObj(tif_ccittrle)
TIFFObj(tif_close)
TIFFObj(tif_compat)
TIFFObjFlags(tif_compress,$(TIFF_CPRESS_CDEFINES))
TIFFObj(tif_dir)
TIFFObj(tif_dirinfo)
TIFFObj(tif_dirread)
TIFFObj(tif_dirwrite)
TIFFObj(tif_dumpmode)
TIFFObj(tif_error)
TIFFObj(tif_jpeg)
TIFFObjFlags(tif_fax3,-I.)
TIFFObj(tif_fax4)
TIFFObj(tif_flush)
TIFFObj(tif_getimage)
TIFFObj(tif_lzw)
TIFFObj(tif_machdep)
TIFFObj(tif_next)
TIFFObj(tif_open)
TIFFObj(tif_packbits)
TIFFObj(tif_print)
TIFFObj(tif_read)
TIFFObj(tif_swab)
TIFFObj(tif_strip)
TIFFObj(tif_thunder)
TIFFObj(tif_tile)
TIFFObj(tif_warning)
TIFFObj(tif_write)
TIFFObj(tif_version)

tif_fax3.o: g3states.h
g3states.h: $(TIFF)/mkg3states.c $(TIFF)/t4.h
	@$(RM) mkg3states
	$(TIFF_CDRIVER) $(TIFF_CLDFLAGS) -o mkg3states $(TIFF)/mkg3states.c
	./mkg3states > g3states.h
clean::
	$(RM) mkg3states g3states.h
#endif

InstallXDefaultAs(../InterViews.defaults,$(LIBALLDIR),InterViews)

IncludeDependencies()

#else

MakeInObjectCodeDir()

#endif
